package com.zzgc.modules.param;

import com.zzgc.common.entity.AuthUser;
import com.zzgc.common.entity.School;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @Author:
 * @CreateTime: 2023-02-02  14:19
 * @Description:
 * @Version: 1.0
 */
@Data
public class AddStudentParam {
    @ApiModelProperty("学校")
    @NotNull(message = "学校不能为空")
    private School school;
    @ApiModelProperty("年级")
    @NotNull(message = "年级不能为空")
    private String sGradeName;
    @ApiModelProperty("班级")
    @NotNull(message = "班级不能为空")
    private String sClassName;
    @ApiModelProperty("学生学号")
    @NotNull(message = "学生学号不能为空")
    private String sStudentNum;
    private Long sStudentId;
    @ApiModelProperty("姓名")
    @NotNull(message = "姓名不能为空")
    private String sName;
    @ApiModelProperty("性别")
    @NotNull(message = "性别")
    private String sSex;
    @ApiModelProperty("是否佩戴OK镜")
    @NotNull(message = "是否佩戴OK镜不能为空")
    private String sOkMirror;
    @ApiModelProperty("联系人电话")
    @NotNull(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String sMobile;
    @ApiModelProperty("身份证号")
    @NotNull(message = "身份证号不能为空")
    @Length(min = 18, max = 18, message = "身份证号只能为18位")
    private String sIdCard;
    @ApiModelProperty("生日")
    private Date sBirthday;
    // 携带学校管理员信息
    private AuthUser user;
}
